UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Y3exYNM5ObvHb1s780NR264k7OO/0O2VBUDW56N6feg='
WHERE
key_id = '550bd31b979d5481732d6a01b03bdffe73751b963cc4c4dc133ea18a26d4c606'
AND (
token = 'Y3exYNM5ObvHb1s780NR264k7OO/0O2VBUDW56N6feg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)