UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9ZUk7B9p1/eNd+08VAeRinVlUzA8iqud6Q70zXl2fzQ='
WHERE
key_id = '550c605baf652d9d176f589c3aedd2fea41ebe24878868e5d46a838a4afa4355'
AND (
token = '9ZUk7B9p1/eNd+08VAeRinVlUzA8iqud6Q70zXl2fzQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)