UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zLguVij6PYzCkPNOnLwq2h184cgd6ljB/63UUr6z1ko=' 
WHERE 
  key_id = 'a49a92c518092a1f491dfe3e79bd43d09e6bf0defc7b8a0942763aad9c670aa9' 
  AND (
    token = 'zLguVij6PYzCkPNOnLwq2h184cgd6ljB/63UUr6z1ko=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033