UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6kQ7lTw2c1UHju9RxLuRR+QrGBN39WWzGvzmWwDRo14='
WHERE
key_id = '1544043d40c2821243cbefde46fbc95cc5ec95cf162edc4071f3d9e856563fe1'
AND (
token = '6kQ7lTw2c1UHju9RxLuRR+QrGBN39WWzGvzmWwDRo14='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)