UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jKfAiq9TdiE1rwdw2EXq+5ztFZn3gi9QaDjUKKH3bQo='
WHERE
key_id = '699552af27935ecd29e2170bfe3d37d301b54d6acbe74fc534c3abde08a5ac24'
AND (
token = 'jKfAiq9TdiE1rwdw2EXq+5ztFZn3gi9QaDjUKKH3bQo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)