UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Svwy44xD9+M/lEylr3ug2mWP9olWUa06UBEerJdcXjg='
WHERE
key_id = '39ee780066e02c2bc5c30d705f5ebf9a1aebe230bcf7159ec823a32d4799dbe7'
AND (
token = 'Svwy44xD9+M/lEylr3ug2mWP9olWUa06UBEerJdcXjg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)