UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+W1+K5MGFC4QGEFfP55b6VfBUlUTBAzl/RmkjI0MP5I=' 
WHERE 
  key_id = '1fdd3cd48c52c55d7bb1cfc3d47fc611d2916c92091fd4e3973a9861cbbfe8bb' 
  AND (
    token = '+W1+K5MGFC4QGEFfP55b6VfBUlUTBAzl/RmkjI0MP5I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037