UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/X0wnlS+53S5q6gPuEGDqOEwU8mDEVHVuxxEiv0wjso=' 
WHERE 
  key_id = 'f1248c1cf8fd2ad1219cbfc2fce9425ec6ef8d42c09ed5878ae05baa3a8684ce' 
  AND (
    token = '/X0wnlS+53S5q6gPuEGDqOEwU8mDEVHVuxxEiv0wjso=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023