UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jOmQt+HhONBVYHszZZqdQZmT/sRu24588B/6DmSnhH8='
WHERE
key_id = '7fae7a31b32c5f5ac5d899d8c8e8094dd70545b838dd497945c851a047af141d'
AND (
token = 'jOmQt+HhONBVYHszZZqdQZmT/sRu24588B/6DmSnhH8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)