UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+E+Q+gsfrDMgcac3ErIOGq6oqgbAccUylEXQ6XzgfOI='
WHERE
key_id = '8abceebcd9b9aa4d4e21e8ef8ca071b75aa36bbf823d4e4e5c78ef235fd87592'
AND (
token = '+E+Q+gsfrDMgcac3ErIOGq6oqgbAccUylEXQ6XzgfOI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)