UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zNs1r4SreWFxGX7yiTuGx/kdMDfxLIeQSrZMi2pF62A=' 
WHERE 
  key_id = '180596ce8c5e4565f4e0843fccc49ba808db1c59144b3fc55711cd27484cc8dd' 
  AND (
    token = 'zNs1r4SreWFxGX7yiTuGx/kdMDfxLIeQSrZMi2pF62A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030