UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8b19PKkL/yOfEsqGwg2hQgfI1vZEMNkSX8PrbvG8yiA=' 
WHERE 
  key_id = 'd42f3ce3ec7630c6804bbc71c72c3c83f44f34e7891bea8ae1ee676046285af1' 
  AND (
    token = '8b19PKkL/yOfEsqGwg2hQgfI1vZEMNkSX8PrbvG8yiA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033