UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pGft38/agNQUUrpgPInmYoQue+G6RWN3lZR7EDdgPjU=' 
WHERE 
  key_id = '9b37bd26cb160464457f414a36a80fcfc6931ee2c538d4541b8b35cda4ffadad' 
  AND (
    token = 'pGft38/agNQUUrpgPInmYoQue+G6RWN3lZR7EDdgPjU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034