UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/LmMWwu5OMLwCNvIu1mhZe8ekoKnjxh39w1x10yyjT8=' 
WHERE 
  key_id = '6beccef240592c2914321f7c34ee73a760830ec36949414180297f48275d7ff3' 
  AND (
    token = '/LmMWwu5OMLwCNvIu1mhZe8ekoKnjxh39w1x10yyjT8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030