UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V8tarisVdByeByFoDG+cz6MHQKNNr6/mg1ka0zBthsk='
WHERE
key_id = '61321dfec9e4d5070531eca62ed4500b97674b15266f5fe3a1a66061b5bfa0cd'
AND (
token = 'V8tarisVdByeByFoDG+cz6MHQKNNr6/mg1ka0zBthsk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)