UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'CrzNgiDj3j8PId7xCZ8YZwFbWfOYa2E/1lvnLUpEdis=' 
WHERE 
  key_id = '00716ff8b58e9eaf424a39715d1e0653f0ff2c6d17e74d59ba0acbc080f8f107' 
  AND (
    token = 'CrzNgiDj3j8PId7xCZ8YZwFbWfOYa2E/1lvnLUpEdis=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00052