UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bftuYXr+N71E/xYb8pkO8Zsb8RRUQODvJHuLyS7afIM='
WHERE
key_id = '43322443ca4f524c98810b61506e67226ebd4d3c9fbe5aeb7cd58ccb76da75d8'
AND (
token = 'bftuYXr+N71E/xYb8pkO8Zsb8RRUQODvJHuLyS7afIM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)