UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/vpAdcQ/59EPIFxDU4kH00hrfkTa5dDN9tcNKWP8Uq4=' 
WHERE 
  key_id = '11d5122aaae2d26c362dc83617df64bdb0a36cc24fd20db8d0ae70fe3f8d5326' 
  AND (
    token = '/vpAdcQ/59EPIFxDU4kH00hrfkTa5dDN9tcNKWP8Uq4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026