UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '614nyMuGJuM/ZaeXyuv6VIUBLpogOxVcM77F05fhHkc='
WHERE
key_id = 'b69baca920213be2b9af0c32fdb3072cbbb7604b322d38c000b5adac179bf57c'
AND (
token = '614nyMuGJuM/ZaeXyuv6VIUBLpogOxVcM77F05fhHkc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)