UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+evUWjhPjyMCtvskJTt//AC5FyUaPMcaC45iDS5XpQc=' 
WHERE 
  key_id = '55ee66be0b590f8aef42d4ae0b64962360acee056ad1b1c909a4d710c42a588e' 
  AND (
    token = '+evUWjhPjyMCtvskJTt//AC5FyUaPMcaC45iDS5XpQc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017