UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'gzZlMirdvVN9G17UP2nTFRWVdemCS3uQR4X2bSTyRsI=' 
WHERE 
  key_id = '41f04e280e03fd1b39bcd0dfe014ab6dcb2f40ed76226309ff039713fd96bcf3' 
  AND (
    token = 'gzZlMirdvVN9G17UP2nTFRWVdemCS3uQR4X2bSTyRsI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033