UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xhLQcY3u1UYlad1slbU63TsYWcqEg78DYMAMr3syuNo=' 
WHERE 
  key_id = '605ecb4fa4dd43ee9f6f0a0f6f2bdcd836a99097c08603df50886deb7f59cd83' 
  AND (
    token = 'xhLQcY3u1UYlad1slbU63TsYWcqEg78DYMAMr3syuNo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020