UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dSV/mM1/H1eUp6n9L/bmmKf9dCKTU8ciT3+1RxoJ6Gc='
WHERE
key_id = '85c6abec13128d94d229521111961526ecd3a15d4f26bff88159e7e3d00cfc80'
AND (
token = 'dSV/mM1/H1eUp6n9L/bmmKf9dCKTU8ciT3+1RxoJ6Gc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)