UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2LzMFzhWtQBiya86JsIOfj+hBXPprCvsfWxo1tEA9hY=' 
WHERE 
  key_id = 'f69849bf9611e0773c5e0d5c8978ad7f614ec22f8cc9a674f4e158d17b8f68cf' 
  AND (
    token = '2LzMFzhWtQBiya86JsIOfj+hBXPprCvsfWxo1tEA9hY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025