UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'tdSkT9SiVCdGRJocTTEJZ7nYIX2zfFF9C+jKMJwihwM=' 
WHERE 
  key_id = '94aa41bfc317e83798e9ce88807d190e3159dd51e65db6a0ab4e20ecfd8b732f' 
  AND (
    token = 'tdSkT9SiVCdGRJocTTEJZ7nYIX2zfFF9C+jKMJwihwM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032