UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+0KdCwoRG6453oJHaveZdAc+2iD2TF5O469ZdGypGZ4='
WHERE
key_id = '60b00e82db6e5c3077ddb243f5ae3f35ef0b6b9138d59047fdb3441ffee6c9a4'
AND (
token = '+0KdCwoRG6453oJHaveZdAc+2iD2TF5O469ZdGypGZ4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)