UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'p4CZjkLD0m9XxBrWH4oHsSanC47/mBVvKmgdHzAkgCg='
WHERE
key_id = '2cbadeba94a6491ae945d85c42f5516d5e5066b3b0881e552a942889ad43ab84'
AND (
token = 'p4CZjkLD0m9XxBrWH4oHsSanC47/mBVvKmgdHzAkgCg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)