UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'YUKWp4Xv7a/8i64Aq0yC1HvaiVKQnaFopljeVImCzTQ=' 
WHERE 
  key_id = 'f3553f0729aa402ccee95cc4a4babb3ee9cce14d5c27212087db1c1ba7b9f092' 
  AND (
    token = 'YUKWp4Xv7a/8i64Aq0yC1HvaiVKQnaFopljeVImCzTQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019