UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jhqX5gopCQJLXqnL6Bc9kPKkESX5+P63rsDABHiItDw='
WHERE
key_id = '7cf8e1e378db566cc8ad5fec4f1db606d4897b3ef4fa3c209ca4bd73c3c5669c'
AND (
token = 'jhqX5gopCQJLXqnL6Bc9kPKkESX5+P63rsDABHiItDw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)