UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'E5j9SpGsA0xnugp3bxMfL+ZYsvUT4/jwQj4w25NSImQ=' 
WHERE 
  key_id = '68fd75ada152375724a2af87fc88e078ff3930b8c1bba2981f843df3f5e657f5' 
  AND (
    token = 'E5j9SpGsA0xnugp3bxMfL+ZYsvUT4/jwQj4w25NSImQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030