UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TCbOweTfp0wY14aVecvd/1yJtIUnjSmqnc49sRakGNc='
WHERE
key_id = '4e96eb22f94532bb503662d1586969a6d2dfbc2f72ac99bbcf81b98ceaedfcec'
AND (
token = 'TCbOweTfp0wY14aVecvd/1yJtIUnjSmqnc49sRakGNc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)