UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TvEOQl2P09FXonJKtxNxlP7VwDYibuAH2LNLB1AILaM='
WHERE
key_id = '153aaa145ada7598fea46cb060ce0da07f4e033b93ac6a8cc362fed5ec9b08a0'
AND (
token = 'TvEOQl2P09FXonJKtxNxlP7VwDYibuAH2LNLB1AILaM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)