UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lPukvfxhrtb/KQBXK1M42ay3/GGRovK1du2IzgWEsIg='
WHERE
key_id = 'adca0d1e3659e463c4cb47790cdfffb6c6de5830b0279e12a120ebda0730eb8c'
AND (
token = 'lPukvfxhrtb/KQBXK1M42ay3/GGRovK1du2IzgWEsIg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)