UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'X3uRXVKBlnmF88lsvPVRla/3oT3wqRmfgWVsXmniq0s='
WHERE
key_id = '937804dc9a947094c41fa0968314c46bf2351bc78beae48463d80475c42bc10f'
AND (
token = 'X3uRXVKBlnmF88lsvPVRla/3oT3wqRmfgWVsXmniq0s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)