UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3u0bpHMmhBlFN15meeBuHtdUHQ0umI2MhP+d4TawcFc='
WHERE
key_id = '265d8408d9e7f90d1dfbc6561b54df1fa1d9fd49bfc9d735b7627b363e94df68'
AND (
token = '3u0bpHMmhBlFN15meeBuHtdUHQ0umI2MhP+d4TawcFc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)