UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SVt0CDaGJ9DUBsa01Q5Xnec1Umr27J8YSeHR/hyvPkI='
WHERE
key_id = '636d731d77bc7d666b7f34ff5c5748bda86c94bc96fd6706537bd9bd8450ab29'
AND (
token = 'SVt0CDaGJ9DUBsa01Q5Xnec1Umr27J8YSeHR/hyvPkI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)