UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'I4YiDnk4QE/gj3ZKA6UbN4pFF31UNUJZD0r/X4VYBAI=' 
WHERE 
  key_id = '4dad6c910e3b8328b0b495e620f046007975617eed450ad20cad15c0a4457033' 
  AND (
    token = 'I4YiDnk4QE/gj3ZKA6UbN4pFF31UNUJZD0r/X4VYBAI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030