UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rd1oAYF8jf5qgoYEfRfiiTb4clR/isNKY/8c+8slqPQ='
WHERE
key_id = '4bb465d54a106e9a6566031599e7cd2b03bacbfa1c672040ae354627683c9100'
AND (
token = 'rd1oAYF8jf5qgoYEfRfiiTb4clR/isNKY/8c+8slqPQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)