UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LbVxxEfhZh1ZLxOMI8wkMwUlRzEGTW8YX7TrI/qqKKo=' 
WHERE 
  key_id = 'a4567c5422ef170ce7e24ec854c2c0bd18b8489718747698bc0a26a5aa50c6af' 
  AND (
    token = 'LbVxxEfhZh1ZLxOMI8wkMwUlRzEGTW8YX7TrI/qqKKo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020