UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'JF1sV6scRAJ1d4KATcZudyiV2GKJfc9H+TMrM3XmTrg=' 
WHERE 
  key_id = '2607fb05f508d568e3aafb781a8ceddc2b29f3a2e7a1750cfeee3e63c5628d83' 
  AND (
    token = 'JF1sV6scRAJ1d4KATcZudyiV2GKJfc9H+TMrM3XmTrg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024