UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xOlVYtq4x/SRyf7pDn90mqYW5ySObhPCf8lA5mhrXEc=' 
WHERE 
  key_id = '2a829d6b7f4e3f58b57efea101e10f386c6638fdabe4b1f9b39d1db3180585e4' 
  AND (
    token = 'xOlVYtq4x/SRyf7pDn90mqYW5ySObhPCf8lA5mhrXEc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028