UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qT49B92kq4/iP7jHIv4tvvU0rfERx/JsFNFEwUwV1LA=' 
WHERE 
  key_id = '3e15a47ad407a97eba4348b5ba2c42e0914ed1b00b78a8e6cadcd2ccbe19f015' 
  AND (
    token = 'qT49B92kq4/iP7jHIv4tvvU0rfERx/JsFNFEwUwV1LA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020