UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IFJYrD5Ruh1u8qLqe+4EL72XJdtQvgqenGhGvHhJSLE='
WHERE
key_id = 'e105940b8185ead0c6d5fa147945f0cd80ea4c407f0265673e6673a3a0ccfa4d'
AND (
token = 'IFJYrD5Ruh1u8qLqe+4EL72XJdtQvgqenGhGvHhJSLE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)