UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 's9DF4a3N1wDMF2JOp7k7gpNPHpjAWVDTwaGR5HGsG8E=' 
WHERE 
  key_id = '7292fbc487ead2f42bf3b5b842b56d796b0eb75ece073a99f5a3c4b40c2491ea' 
  AND (
    token = 's9DF4a3N1wDMF2JOp7k7gpNPHpjAWVDTwaGR5HGsG8E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029