UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/gd/8/ZRggk26WuJjd5upkgyXxaSpqNKXm8+4U7CpKw='
WHERE
key_id = '9d4f2c635feb9ac024b738b74f2c61bdf5f26459b1b66454a24d65ff5f1668dd'
AND (
token = '/gd/8/ZRggk26WuJjd5upkgyXxaSpqNKXm8+4U7CpKw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)