UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'K2CMiEtQ8DcIOb9+KNq0W/zq/La3Z0PkTIPhqbwzdzA='
WHERE
key_id = '19063457175d3f191a13b118107a6ca7de8f4e555f34045b97303e0568ec78ea'
AND (
token = 'K2CMiEtQ8DcIOb9+KNq0W/zq/La3Z0PkTIPhqbwzdzA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)