UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Yxn2gRknQ+3FH4c++lZW921twS6bcrCfk5GNxtCJ5WE='
WHERE
key_id = 'dab428cad0ea96d6fb0c059ee523f81429ab01038194e64ce4c181d5d8930e82'
AND (
token = 'Yxn2gRknQ+3FH4c++lZW921twS6bcrCfk5GNxtCJ5WE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)