UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xZjY47jmi6z61D222M2ZVKplTChkWCWgZOpEHFgGScY=' 
WHERE 
  key_id = '93542779bcd7be964e08ce3c801d00e72b628d0114b89cee889127260f979707' 
  AND (
    token = 'xZjY47jmi6z61D222M2ZVKplTChkWCWgZOpEHFgGScY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031