UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/9niQlACE3jwFVmQ2rWVhMYVEFmb2MEo/UnMrjfLbBM=' 
WHERE 
  key_id = '34c900cec92ffed66f736aa7b73fd249a193204d1b0b5f82bb5d607458d14f8f' 
  AND (
    token = '/9niQlACE3jwFVmQ2rWVhMYVEFmb2MEo/UnMrjfLbBM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021