UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8YcrCjzSdHS+1ZtuFm/iywW9Yb+DPTAjoiFoA85a7u8=' 
WHERE 
  key_id = '60a5be034f78248b5cb98b5e7ea85dd13290aac3184bf5da011b1f4d1ec1600c' 
  AND (
    token = '8YcrCjzSdHS+1ZtuFm/iywW9Yb+DPTAjoiFoA85a7u8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030