UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ODP7JYQ13tr+E36TD2S0lG1Fw3fq/WEFPAMxsq5+5Yo='
WHERE
key_id = '1c83f98e3df0f767d0010069140fd65df7fc991cc8fb82e9da5727c725fbb04f'
AND (
token = 'ODP7JYQ13tr+E36TD2S0lG1Fw3fq/WEFPAMxsq5+5Yo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)