UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Mqz0n/PEBGY4g7DU4TaofDI64T5je4QxfrTwOVG1+Qk='
WHERE
key_id = '19809b355cdc6316b209fafc6f8f1d26772d98319bc07ad63900037becf351c3'
AND (
token = 'Mqz0n/PEBGY4g7DU4TaofDI64T5je4QxfrTwOVG1+Qk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)