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

Query time 0.00025